import request from '@/utils/request'

// 查询
export function listProduct(query) {
    return request({
      url: '/prod/list',
      method: 'get',
      params: query
    })
  }

// 添加产品基本信息
export function addProduct(query) {
    return request({
      url: '/prod/add',
      method: 'get',
      params: query
    })
  }

// 保存产品图片
export function addProductImg(query) {
    return request({
      url: '/prod/addimg',
      method: 'post',
      data: query
    })
  }
  
export function delProduct(ids) {
  return request({
    url: '/prod/del/' + ids,
    method: 'delete'
  })
}

export function expData(query) {
  return request({
    url: '/prod/expdata',
    method: 'get',
    params: query
  })
}

export function downPic(query) {
  return request({
    url: '/prod/downpic',
    method: 'get',
    params: query
  })
}

export function query(id) {
  return request({
    url: '/prod/query?id=' + id,
    method: 'get'   
  })
}

export function update(query) {
  return request({
    url: '/prod/update',
      method: 'post',
      data: query
  })
}
//queryimg

export function queryImg(id) {
  return request({
    url: '/prod/queryimg?id=' + id,
    method: 'get'   
  })
}